﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SSRSViewer.Core;

namespace SSRSViewer.Win
{
    partial class BooleanParameterUserControl : UserControl, IParameterEditor, IBooleanParameterUserControl
    {
        public BooleanParameterUserControl()
        {
            InitializeComponent();
        }

		public void Initialize() { }
		
		#region IParameterEditor Members

        public object EditValue
        {
            get { return editor.Checked; }
            set
            {
                if (value is bool)
                    editor.Checked = Convert.ToBoolean(value);
                else
                    throw new InvalidCastException("Looking for a boolean value.");
            }
        }
        public string Prompt
        {
            get { return editor.Text; }
            set { editor.Text = value; }
        }
        public RdlReportParameter EditingParameter { get; set; }
        #endregion
    }
}
